home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIX 6.2 Applications 1996 May
/
SGI IRIX 6.2 Applications 1996 May.iso
/
dist
/
impr_dev.idb
/
usr
/
share
/
catman
/
p_man
/
cat3
/
stread.z
/
stread
Wrap
Text File
|
1996-05-06
|
4KB
|
133 lines
SSSSTTTTRRRReeeeaaaadddd((((3333)))) IIIImmmmpppprrrreeeessssssssaaaarrrriiiioooo SSSSTTTTRRRReeeeaaaadddd((((3333))))
NNNNAAAAMMMMEEEE
STRead, STWrite - read/write STIFF image data
SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
####iiiinnnncccclllluuuuddddeeee <<<<ssssttttddddiiiioooo....hhhh>>>>
####iiiinnnncccclllluuuuddddeeee <<<<ssssttttiiiiffffffff....hhhh>>>>
iiiinnnntttt SSSSTTTTRRRReeeeaaaadddd((((SSSSTTTTSSSSttttrrrreeeeaaaammmm ****sssstttt,,,, vvvvooooiiiidddd ****bbbbuuuuffff,,,, iiiinnnntttt nnnnbbbbyyyytttteeeessss))));;;;
iiiinnnntttt SSSSTTTTWWWWrrrriiiitttteeee((((SSSSTTTTSSSSttttrrrreeeeaaaammmm ****sssstttt,,,, vvvvooooiiiidddd ****bbbbuuuuffff,,,, iiiinnnntttt nnnnbbbbyyyytttteeeessss))));;;;
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
_S_T_R_e_a_d reads the specified amount of image data from a STIFF stream. The
stream specified by _s_t must have been opened as SSSSTTTT____RRRREEEEAAAADDDD. The number of
bytes of image data specified by _n_b_y_t_e_s is read into the caller supplied
buffer _b_u_f. _S_T_R_e_a_d is called after a call to _S_T_R_e_a_d_I_m_a_g_e_H_e_a_d_e_r (or
_P_S_T_R_e_a_d_I_m_a_g_e_H_e_a_d_e_r), which will have supplied in the image header
structure the amount of image data available for reading.
_S_T_W_r_i_t_e writes the specified amount of image data to a STIFF stream. The
stream specified by _s_t must have been opened as SSSSTTTT____WWWWRRRRIIIITTTTEEEE. The number of
bytes of image data specified by _n_b_y_t_e_s is written from the caller
supplied buffer _b_u_f. _S_T_W_r_i_t_e is called after a call to _S_T_W_r_i_t_e_I_m_a_g_e_H_e_a_d_e_r
(or _P_S_T_W_r_i_t_e_I_m_a_g_e_H_e_a_d_e_r), which will have initialized a page for the
writing of image data.
RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
Both _S_T_R_e_a_d and _S_T_W_r_i_t_e return the number of bytes read or written if
execution was successful. -1 is returned and _S_T_e_r_r_n_o is set if an
execution error has occurred.
Note that it is possible for _S_T_R_e_a_d to return a number that is smaller
than _n_b_y_t_e_s. This happens if _S_T_R_e_a_d encounters an end of file before it
has read _n_b_y_t_e_s of data. In this situation, the number of bytes read is
returned and _S_T_e_r_r_n_o is set to SSSSTTTTEEEEEEEEOOOOFFFF.
EEEEXXXXEEEECCCCUUUUTTTTIIIIOOOONNNN EEEERRRRRRRROOOORRRR CCCCOOOODDDDEEEESSSS
_S_T_R_e_a_d will fail under the following circumstances.
STEREADFROMWRITE Attempt to read from a write stream.
STESYSCALL System call failed.
STEEOF End of stream.
_S_T_W_r_i_t_e will fail under the following circumstances.
STEWRITETOREAD Attempt to write to a read only stream.
STESYSCALL System call failed.
PPPPaaaaggggeeee 1111
SSSSTTTTRRRReeeeaaaadddd((((3333)))) IIIImmmmpppprrrreeeessssssssaaaarrrriiiioooo SSSSTTTTRRRReeeeaaaadddd((((3333))))
SSSSEEEEEEEE AAAALLLLSSSSOOOO
libstiff(3).
PPPPaaaaggggeeee 2222